package com.rzl.expense.expense.service.impl;

import java.util.List;
import com.rzl.expense.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rzl.expense.expense.mapper.TwrRentCtlRoomMapper;
import com.rzl.expense.expense.domain.TwrRentCtlRoom;
import com.rzl.expense.expense.service.ITwrRentCtlRoomService;

/**
 * 需求管控平台移动侧起租-室分Service业务层处理
 * 
 * @author expense
 * @date 2025-01-23
 */
@Service
public class TwrRentCtlRoomServiceImpl implements ITwrRentCtlRoomService 
{
    @Autowired
    private TwrRentCtlRoomMapper twrRentCtlRoomMapper;

    /**
     * 查询需求管控平台移动侧起租-室分
     * 
     * @param rentId 需求管控平台移动侧起租-室分主键
     * @return 需求管控平台移动侧起租-室分
     */
    @Override
    public TwrRentCtlRoom selectTwrRentCtlRoomByRentId(String rentId)
    {
        return twrRentCtlRoomMapper.selectTwrRentCtlRoomByRentId(rentId);
    }

    /**
     * 查询需求管控平台移动侧起租-室分列表
     * 
     * @param twrRentCtlRoom 需求管控平台移动侧起租-室分
     * @return 需求管控平台移动侧起租-室分
     */
    @Override
    public List<TwrRentCtlRoom> selectTwrRentCtlRoomList(TwrRentCtlRoom twrRentCtlRoom)
    {
        return twrRentCtlRoomMapper.selectTwrRentCtlRoomList(twrRentCtlRoom);
    }

    /**
     * 新增需求管控平台移动侧起租-室分
     * 
     * @param twrRentCtlRoom 需求管控平台移动侧起租-室分
     * @return 结果
     */
    @Override
    public int insertTwrRentCtlRoom(TwrRentCtlRoom twrRentCtlRoom)
    {
        twrRentCtlRoom.setCreateTime(DateUtils.getNowDate());
        return twrRentCtlRoomMapper.insertTwrRentCtlRoom(twrRentCtlRoom);
    }

    /**
     * 修改需求管控平台移动侧起租-室分
     * 
     * @param twrRentCtlRoom 需求管控平台移动侧起租-室分
     * @return 结果
     */
    @Override
    public int updateTwrRentCtlRoom(TwrRentCtlRoom twrRentCtlRoom)
    {
        twrRentCtlRoom.setUpdateTime(DateUtils.getNowDate());
        return twrRentCtlRoomMapper.updateTwrRentCtlRoom(twrRentCtlRoom);
    }

    /**
     * 批量删除需求管控平台移动侧起租-室分
     * 
     * @param rentIds 需要删除的需求管控平台移动侧起租-室分主键
     * @return 结果
     */
    @Override
    public int deleteTwrRentCtlRoomByRentIds(String[] rentIds)
    {
        return twrRentCtlRoomMapper.deleteTwrRentCtlRoomByRentIds(rentIds);
    }

    /**
     * 删除需求管控平台移动侧起租-室分信息
     * 
     * @param rentId 需求管控平台移动侧起租-室分主键
     * @return 结果
     */
    @Override
    public int deleteTwrRentCtlRoomByDate(String yearmonth)
    {
        return twrRentCtlRoomMapper.deleteTwrRentCtlRoomByDate(yearmonth);
    }




    @Override
    public void batchTwrRentCtlRoom(List<TwrRentCtlRoom> list)
    {

         twrRentCtlRoomMapper.batchTwrRentCtlRoom(list);
    }


}
